import React, {
	Component
} from "react";
import {
	View,
	Text
} from "react-native";
import {
	StackNavigator
} from "react-navigation";
import SearchPage from "./container/SearchPage";
import SearchResult from "./container/SearchResult";
import PropertyView from "./container/PropertyView";



class Shopping extends Component {
	static navigationOptions = {
		title: '首页',
	}
	constructor(props) {
		super(props);
		this.handleResult = this.handleResult.bind(this);
	}
	handleResult() {
		const {
			navigate
		} = this.props.navigation;
		navigate('SearchResult');
	}

	render() {
		return (
			<SearchPage store={this.handleResult} />
		);
	}
}

export default StackNavigator({
	Home: {
		screen: Shopping
	},
	SearchResult: {
		screen: SearchResult
	},
	DetailsOfHouse: {
		path: "houseInfo",
		screen: PropertyView,
	}
})